package cn.sjxy.doctorms.domain;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Component;

import cn.sjxy.doctorms.domain.Doctor;
@Component
public class Department {
    private Integer deptId;
    private String deptName;
    private String description;
    private Date timeCreated;
    
    // 一对多：科室下的医生列表
    private List<Doctor> doctors;
    
    //无参构造方法
    public Department() {
		super();
	}
    
    //有参构造方法
    public Department(Integer deptId, String deptName, String description, Date timeCreated) {
		super();
		this.deptId = deptId;
		this.deptName = deptName;
		this.description = description;
		this.timeCreated = timeCreated;
	}

    // Getters & Setters
	public Integer getDeptId() {
		return deptId;
	}

	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getTimeCreated() {
		return timeCreated;
	}

	public void setTimeCreated(Date timeCreated) {
		this.timeCreated = timeCreated;
	}


	public List<Doctor> getDoctors() {
		return doctors;
	}

	public void setDoctors(List<Doctor> doctors) {
		this.doctors = doctors;
	}

	@Override
	public String toString() {
		return "Department [deptId=" + deptId + ", deptName=" + deptName + ", description=" + description
				+ ", timeCreated=" + timeCreated + "]";
	}
    
}
